import 'package:flutter/material.dart';

class StatelessComp extends StatelessWidget {
  const StatelessComp(
      {super.key, required this.userName, required this.gender});
  final String userName;
  final String? gender;
  final String _intro = '这是一个无状态组件';
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Text('这是一个无状态组件,他的名字是：$userName,性别是：$gender'),
        Text(_intro),
      ],
    );
  }
}
